package cn.cytong.util

import org.nutz.lang.Lang
import org.slf4j.LoggerFactory
import org.slf4j.helpers.MessageFormatter

/**
 * util包下的公共方法
 * Created by orangeJ on 2017-05-26.
 */
fun throwBadArgument(message: String, vararg args: Any?): Nothing {
    throw IllegalArgumentException(MessageFormatter.arrayFormat(message, args).message)
}

fun throws(clazz: Class<RuntimeException>, message: String, vararg args: Any?): Nothing {
    throw Lang.makeThrow(clazz, MessageFormatter.arrayFormat(message, args).message)
}

